package com.tbit.uqbike.object.pojo;

import lombok.Data;

import java.util.Date;

/**
 * @Author: chen
 * @Description: 设备订单记录返回类
 * @Date: 创建于 14:54 2020/3/20
 */
@Data
public class MachineRideLog {
    /**
     * 订单编号
     */
    private String orderNO;
    /**
     * 设备编号
     */
    private String machineId;
    /**
     * 区域id
     */
    private Integer accountId;
    /**
     * 区域名称
     */
    private String accountName;
    /**
     * 设备编号
     */
    private String machineNO;
    /**
     * 车辆编号
     */
    private String userCode;
    /**
     * 开始时间
     */
    private Date startTime;
    /**
     * 结束时间
     */
    private Date endTime;
    /**
     * 支付时间
     */
    private Date payTime;
    /**
     * 骑行时长
     */
    private Integer rideTime;
    /**
     * 金额
     */
    private Integer money;
    /**
     * 停车时长
     */
    private Integer stopTime;
    /**
     * 里程
     */
    private Double mileage;
    /**
     * 用户手机号码
     */
    private String phone;
    /**
     * 开始站点经度
     */
    private Double startLon;
    /**
     * 开始站点纬度
     */
    private Double startLat;
    /**
     * 结束站点经度
     */
    private Double endLon;
    /**
     * 结束站点纬度
     */
    private Double endLat;
    /**
     * 用户名
     */
    private String name;
    /**
     * 站点名
     */
    private String parkPointName;
    /**
     * 用户id
     */
    private Integer userId;
    /**
     * 备注
     */
    private String remark;

    /**
     * 申诉id
     */
    private Integer appealId;

    public boolean onRiding() {
        return this.endTime == null && (this.mileage == null || this.mileage <= 0.0);
    }

    @Override
    public String toString() {
        return "MachineRideLog{" +
                "orderNO='" + orderNO + '\'' +
                ", machineNO='" + machineNO + '\'' +
                ", userCode='" + userCode + '\'' +
                ", startTime=" + startTime +
                ", endTime=" + endTime +
                ", payTime=" + payTime +
                ", money=" + money +
                ", stopTime=" + stopTime +
                ", mileage=" + mileage +
                ", phone='" + phone + '\'' +
                ", startLon=" + startLon +
                ", startLat=" + startLat +
                ", endLon=" + endLon +
                ", endLat=" + endLat +
                '}';
    }
}
